<#import "config/config.ftl" as config />
<#import "template/template.ftl" as template />
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <title>欢迎登录</title>
    <@config.gcss></@config.gcss>
    <@config.bootCSS></@config.bootCSS>
    <@config.wavesCSS></@config.wavesCSS>
    <@config.animateCSS></@config.animateCSS>
    <@config.styleCSS></@config.styleCSS>
    <#--<@config.themesCSS></@config.themesCSS>-->
    <@config.appCSS></@config.appCSS>
</head>
<body class="login-page">

<div class="login-box">
    <div class="logo">
        <a href="javascript:void(0);"><b>统一管理系统</b></a>

    </div>
    <div class="card">
        <div class="body">
            <form id="sign_in" method="POST" action="${base}/login.htm" onsubmit="doValidate()">
                <div class="input-group">
                        <span class="input-group-addon">
                            <i class="material-icons">person</i>
                        </span>
                    <div class="form-line">
                        <input type="text" class="form-control" name="username" id="username" placeholder="用户名" required>
                    </div>
                </div>
                <div class="input-group">
                        <span class="input-group-addon">
                            <i class="material-icons">lock</i>
                        </span>
                    <div class="form-line">
                        <input type="password" class="form-control" name="password" id="password" placeholder="密码" required>
                    </div>
                </div>

                <div class="input-group">
                        <span class="input-group-addon">
                            <i class="material-icons">photo</i>
                        </span>
                    <div  class="login-validate">

                    <div class="form-line">
                        <input type="text" class="form-control" name="validatecode" placeholder="验证码" required>
                    </div>
                    <img src="${base}/api/validatecode" onclick="doChoiceValidate(this);" style="cursor: pointer;height: 35px;" title="点击更换">
                    </div>
                </div>
                <div class="row">
                    <div class="col-xs-8 p-t-5">
                        <input type="checkbox" name="rememberMe" id="rememberme" class="filled-in chk-col-pink">
                        <label for="rememberme">记住我</label>
                    </div>
                    <div class="col-xs-4">
                        <button class="btn btn-block bg-pink waves-effect" type="submit">登录</button>
                    </div>
                </div>

                <div class="row">
                    <div class="col-xs-8 p-t-5">
                        <#--错误消息-->
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<@config.jqueryJS></@config.jqueryJS>
<@config.bootJS></@config.bootJS>
<@config.wavesJS></@config.wavesJS>
<@config.jqueryValidateNewJS></@config.jqueryValidateNewJS>
<@config.adminJS></@config.adminJS>

<@config.appJS></@config.appJS>

<script type="application/javascript">
    var validate="";
    $(function(){
        validate= $.App.home.validateForm("sign_in");
    });
    function doChoiceValidate(obj){
        $(obj).attr("src", "${base}/api/validatecode?t=" + new Date().getTime());
    }

    function doValidate(){

    }
</script>
</body>
        